package com.itcast.tanhua.dubbo.server.api;

import com.itcast.tanhua.dubbo.server.domain.Video;
import com.itcast.tanhua.dubbo.server.vo.PageInfo;

import java.util.List;

/**
 * @PachageName: com.itcast.tanhua.dubbo.server.api
 * @ClassName:
 * @Description: TODO
 * @Author: Hushi
 * @DateTime: 2021/2/1820:14
 * @Version 1.0
 */
public interface VideoApi {
    /**
     * 保存小视频 (发布)
     *
     * @param video
     * @return
     */
    Boolean saveVideo(Video video);

    /**
     * 分页查询小视频列表，按照时间倒序排序
     *
     * @param page
     * @param pageSize
     * @return
     */
    PageInfo<Video> queryVideoList(Integer page, Integer pageSize);

    /**
     * 关注用户
     *
     * @param userId
     * @param followUserId
     * @return
     */
    Boolean followUser(Long userId, Long followUserId);

    /**
     * 取消关注用户
     *
     * @param userId
     * @param followUserId
     * @return
     */
    Boolean disFollowUser(Long userId, Long followUserId);

    /**
     * 根据id查询小视频
     * @param videoId
     * @return
     */
    Video queryVideoById(String videoId);

    /**
     * 根据Vids批量查询小视频列表
     * @param vidList
     * @return
     */
    List<Video> queryVideoListByPids(List<Long> vidList);

}
